package view;

import controllers.C_Control;
import processing.core.PApplet;
import processing.core.PGraphics;

//The superclass for all view objects (points, properties, toolbars, UI_Components...)
public class V_DisplayFeature 
{
  protected C_Control ctrl; // An optional controller object
  protected boolean visible = true;
  protected int displayPriority;
   
  public void display(PApplet p){} // draw to the given PApplet canvas
  
  public boolean getVisibility()
  {
    return visible;
  }
  
  public void setVisibility(boolean val)
  {
    visible = val;
  }
  
  public void setController(C_Control c)
  {
    ctrl = c;
  }
  
  public C_Control getController()
  {
    return ctrl;
  }
    
  public int getDisplayPriority()
  {
    return displayPriority;
  }
  
  public void setDisplayPriority(int val)
  {
    displayPriority = val;
  }
  
  public boolean contains(float xVal, float yVal) { return true; }
  
  public void addSelfToList(DisplayList viewList)
  {
	  viewList.addUIObject(this);
  }
}
